package gameRunning.mediator.com;

import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

public class BitmapText extends BitmapFont {
	
	public float x;
	public float y;
	public String text;
	public int life=100;
	public int cPriorityLevel=10;
	public BitmapTextEnd callBackBitmapTextEnd=null;
	
	public BitmapText(FileHandle internal, FileHandle internal2, boolean b) {
		super(internal, internal2, b);
		// TODO Auto-generated constructor stub
	}
	public BitmapText()
	{
		super();
	}
	
	
	public TextBounds draw(SpriteBatch spriteBatch) {
		// TODO Auto-generated method stub
		life--;
		if(life<0)
		{
			cPriorityLevel=10;
			if(callBackBitmapTextEnd!=null)
				callBackBitmapTextEnd.end();
			callBackBitmapTextEnd=null;
			
		}
			
		return super.draw(spriteBatch, this.text, this.x, this.y);
		
	}
	
}
